<!--#include file="conn.asp"-->
<!--#include file="chkuser.asp"-->
<%
call adminRight(8)

ID=request("ID")

if request("action")="edit" then

	for i=0 to 9
		b=request(i)
		if b="" then b=0
		if a="" then
			a=b
		else
			a=a&"|"&b
		end if
	next
	a=replace(a," ","")

	Set rs=server.CreateObject("ADODB.RECORDSET")
	sql="select * from Admin_lt_jt_wjk where id="&id
	rs.open sql,conn,1,3
	rs("admin_right")=a
	rs.update
	alert("修改成功!")
	Go("Admin_User.asp?showMsgStr=<br><b>"&rs("admin_User_wjk")&"管理员权限已修改成功！</b>|parent|3000|500||")
	rs.close
	set rs=nothing
	response.end
end if
%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>修改密码</title>
<link href="style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<%
sql="select * from Admin_lt_jt_wjk where id="&id
Set rs = Server.CreateObject("ADODB.Recordset")
rs.open sql,conn,1,1

admin_right=split(rs("admin_right"),"|")

fla0=admin_right(0)
fla1=admin_right(1)
fla2=admin_right(2)
fla3=admin_right(3)
fla4=admin_right(4)
fla5=admin_right(5)
fla6=admin_right(6)
fla7=admin_right(7)
fla8=admin_right(8)
fla9=admin_right(9)
%>
   <form method="post" action="?action=edit&ID=<%=ID%>">
    <div id="frame_Toolbar" class="toolbarBg"> 
		<a href="javascript:self.history.back();" class="icoBtn_ct"><span class="btnIco btnBack"></span>返回</a> 
		<a href="javascript:self.location.reload();" class="icoBtn_ct"><span class="btnIco btnReload"></span>刷新</a> 
		<span class="split ftSplit" ></span>
	<div id="guide" class="light_orange">请填写动态信息！</div>
	<div class="pageInfo right light_gray"></div>
    </div>
    <table class="cTable_2 table">
	<tr class="cTitle toolbarBg">
		<td width="25%"><div class="cLeftPadding">修改管理员权限</div></td>
		<td width="75%"></td>
	</tr>
	<tr>
    <td class="tRight">用户名：</td>
	  <td><%=rs("admin_User_wjk")%></td>
	  </tr>
	<tr>
    <td class="tRight" valign="top" style="padding-top: 5px;">权限：</td>
	  <td>
	  <input name="0" type="checkbox" value="1" <%if fla0=1 then%>checked<%end if%>>
	    页面信息管理<br />
      <input name="1" type="checkbox" value="1" <%if fla1=1 then%>checked<%end if%>>
	    产品管理<br />
      <input name="2" type="checkbox" value="1" <%if fla2=1 then%>checked<%end if%>>
	    新闻管理<br />
      <input name="4" type="checkbox" value="1" <%if fla4=1 then%>checked<%end if%>>
	    招聘管理<br />

      <input name="6" type="checkbox" value="1" <%if fla6=1 then%>checked<%end if%>>
	    预订管理<br />
      <input name="8" type="checkbox" value="1" <%if fla8=1 then%>checked<%end if%>>
	    用户管理<br />
      <input name="9" type="checkbox" value="1" <%if fla9=1 then%>checked<%end if%>>
	    系统管理<br />
	   </td>
	</tr>
</table>
	<%
	   rs.close
	   set rs=nothing
	%>
    <div id="cEndToolbar" class="toolbarBg">
      <div class="caButCase">
		    <input type="submit" name="Submit" value="确认修改" class="button">
	        <input type="reset" name="Submit2" value="清空重填" class="button">
      </div>
    </div>
  </form>
</body>
</html>
